package cn.rtangyy.seckilling.service.impl;

import cn.rtangyy.seckilling.dao.GoodsDao;
import cn.rtangyy.seckilling.service.GoodsService;
import cn.rtangyy.seckilling.vo.GoodsVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.DigestUtils;
import org.springframework.util.ObjectUtils;

import java.util.List;

@Service
public class GoodsServiceImpl implements GoodsService {
    @Autowired
    private GoodsDao goodsDao;
    @Override
    public List<GoodsVo> findGoodsVo() {
        return goodsDao.findGoodsVo();
    }

    @Override
    public GoodsVo findGoodsVoById(Long goodsId) {
        return goodsDao.findGoodsVoById(goodsId);
    }

    @Override
    public int findStockByGoodsId(Long goodsId) {
        return goodsDao.queryStockByGoodsId(goodsId);
    }
}
